<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
		.Controls_View,.Controls_header{border-radius: 50px;font-weight: bold;text-align:center;color:blue;
		font-size: 20px;margin-top: 15px;}
			.Controls_header{background: #F90;height: 50px;line-height:50px ;}
			.Cpntrols_Left,.Cpntrols_Right{min-height:350px;background:#33CCFF;border-right: 1px solid white;
			border-radius: 30px;padding:10px}
			li{background:transparent !important;border-radius: 50%;transition:all 1s;
			border:0px !important;border-bottom: 1px solid white !important;}
		li:hover{background: #F90 !important;cursor: pointer;}
		</style>
	</head>
	<body>
			<h6><kbd>&nbsp;前台页面的小工具&nbsp;</kbd></h6>
			<form action="{:U(MODULE_NAME.'/Controls/view')}" method="post"  class="col-lg-12">
			<div class="col-lg-5">
				<select name="page" id="" class="select-inverse-dropdown form-control">
				<option value="Index">首页</option>
				<option value="List">列表查看页</option>
				<option value="View">详情查看页</option>
			</select>		
				</div><input type="submit" class="btn btn-success col-lg-2 " value="查 看" />
			</form>
			
			<div class="row Controls_View">
					<div class="Controls_header  col-lg-12">
						Head
					</div>
					<div class="Controls_Content  col-lg-12">
						<div class="Cpntrols_Left  col-lg-6">
							Left
						</div>
						<div class="Cpntrols_Right col-lg-6">
								<ul class="list-group">
								<foreach name="controls" item="c">
								 <li class="list-group-item"><kbd>{$c.type}</kbd> {$c.title|default="未命名"} 
								 <span class="btn-group btn-group-xs pull-right">
								 <a class="btn btn-danger" onclick="ShowDialog(this)" data-url="{:U(MODULE_NAME.'/Controls/delete',array(id=>$c['id']))}" href="javascript:void(0)" data-toggle="modal">删除</a>
								<eq name="c.visible" value="y">
									<a  title="当前为显示，点击隐藏" class="btn btn-warning" href="{:U(MODULE_NAME.'/Controls/visible',array(id=>$c['id'],visible=>n))}">隐藏</a>
								<else />
									<a  title="当前为隐藏，点击显示" class="btn btn-warning" href="{:U(MODULE_NAME.'/Controls/visible',array(id=>$c['id'],visible=>y))}">显示</a>
								</eq>
								</span>
								 </li>
								</foreach>
								</ul>
								
						</div>
						
					</div>
			</div>

	</body>
	  {:W('Modal/dialog',array("删除提示","你确定要删除选择的控件嘛？"))}
      	<script src="__PUBLIC__/js/dialogHandle.js"></script>
	<script>
	$('[name=page]').val('{:I("page")}');
		function DeleteInfo(id)
		{
			$(".btn-danger").attr('href','');
			$('.modal').modal('show').on('shown.bs.modal',function()
			{
				$(".btn-danger").attr('href','/Manager/Controls/del/id'+id);
			});
		}   
	</script>
</html>
